package com.question.java.date7;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Description:
 * @Author: Jun Yang
 * @Time: 2018/12/20 下午3:40
 * @Version: 1.0
 */
public class Date7Main {
    public static void main(String[] args) throws ParseException {
        Date d1 = new Date();

        Date newDate = DateUtil.dayPlus(d1, 3);

        System.out.println(d1);
        System.out.println(newDate);
        System.out.println(newDate.after(d1));


        //街镇代注册，日期
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
       // Date  pfDate = sdf.parse("2018-12-17 16:02:00");
        Date pfDate = null;
        Date giveDate = DateUtil.dayPlus(pfDate, 3);
        Date nowDate = new Date();

        System.out.println("giveDate: " + giveDate);
        System.out.println("nowDate: " + nowDate);

        if (nowDate.after(giveDate)) {
            System.out.println("发放股权");
        } else {
            System.out.println("不发放股权");
        }
    }
}
